using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Recorder;
using UnityEngine.Recorder.Input;

namespace UTJ.FrameCapturer.Recorders
{
	[ExecuteInEditMode]
	public class WEBMRecorderSettings : BaseFCRecorderSettings
	{
		public fcAPI.fcWebMConfig m_WebmEncoderSettings = fcAPI.fcWebMConfig.default_value;

		public bool m_AutoSelectBR;

		private WEBMRecorderSettings()
		{
			m_BaseFileName.pattern = "movie.<ext>";
			m_AutoSelectBR = true;
		}

		public override List<RecorderInputSetting> GetDefaultInputSettings()
		{
			List<RecorderInputSetting> list = new List<RecorderInputSetting>();
			list.Add(NewInputSettingsObj<CBRenderTextureInputSettings>("Pixels"));
			return list;
		}

		public override RecorderInputSetting NewInputSettingsObj(Type type, string title)
		{
			RecorderInputSetting recorderInputSetting = base.NewInputSettingsObj(type, title);
			if (type == typeof(CBRenderTextureInputSettings))
			{
				(recorderInputSetting as CBRenderTextureInputSettings).m_ForceEvenSize = true;
			}
			return recorderInputSetting;
		}
	}
}
